<template>
    <div>
        <div>
            {{ $store.state.num }}
        </div>
        <div>
            {{ comList }}
        </div>
        <div>
            <button @click="add">添加身高</button>
        </div>
        <div>名字:{{ $store.state.info.name }}</div>
        <div>年龄:{{ $store.state.info.age }}</div>
        <div>身高:{{ $store.state.info.height }}</div>
    </div>
</template>

<script>
export default {
    data() {
        return {};
    },
    mounted() {},
    computed: {
        comList() {
            return this.$store.getters.more(18);
        }
    },
    methods: {
        add() {
            this.$store.commit('addHeight');
        }
    }
};
</script>

<style></style>
